import React from 'react';
import './index.less';


export default (props) => {
    const {
        selectBase, 
        active, 
        itemConfig, 
        delComponent, 
        setStyle, 
        children,
        zIndex
    } = props;
    
    return (
        <span 
            className="base-wrapper"
            style={{
                zIndex: zIndex
            }}
        >
            <div 
                className={`base-wrapper-toolbar${active ? ' active' : ''}`}
                onClick={selectBase}
            >
                <span
                    onClick={delComponent(itemConfig)}
                >
                    删除
                </span>
                <span
                    onClick={setStyle}
                >
                    设置
                </span>
            </div>
            {children}
        </span>
    );

}